package com.aspose.cells;

public class zcfp {
   private int a;
   private zcfp.za[] b;
   private int c;
   private int d = 31;

   public zcfp() {
      this.b = new zcfp.za[this.d + 1];
      double var1 = CellsHelper.getDoubleFromDateTime(DateTime.getNow(), false);
      this.c = (int)(var1 - (double)((long)var1)) * 24 * 3600 * 1000;
   }

   public String a(String var1) {
      if (var1 == null) {
         return "";
      } else {
         int var2 = var1.length();
         if (var2 == 0) {
            return "";
         } else {
            int var3 = var2 + this.c;

            for(int var4 = 0; var4 < var1.length(); ++var4) {
               var3 += var3 << 7 ^ var1.charAt(var4);
            }

            var3 -= var3 >> 17;
            var3 -= var3 >> 11;
            var3 -= var3 >> 5;

            for(zcfp.za var5 = this.b[var3 & this.d]; var5 != null; var5 = var5.b) {
               if (var5.a == var3 && var5.c.equals(var1)) {
                  return var5.c;
               }
            }

            return this.a(var1, var3);
         }
      }
   }

   public String a(char[] var1, int var2, int var3) {
      if (var3 == 0) {
         return "";
      } else {
         int var4 = var3 + this.c;
         var4 += var4 << 7 ^ var1[var2];
         int var5 = var2 + var3;

         for(int var6 = var2 + 1; var6 < var5; ++var6) {
            var4 += var4 << 7 ^ var1[var6];
         }

         var4 -= var4 >> 17;
         var4 -= var4 >> 11;
         var4 -= var4 >> 5;

         for(zcfp.za var7 = this.b[var4 & this.d]; var7 != null; var7 = var7.b) {
            if (var7.a == var4 && a(var7.c, var1, var2, var3)) {
               return var7.c;
            }
         }

         return this.a(new String(var1, var2, var3), var4);
      }
   }

   private String a(String var1, int var2) {
      int var3 = var2 & this.d;
      zcfp.za var4 = new zcfp.za(var1, var2, this.b[var3]);
      this.b[var3] = var4;
      if (this.a++ == this.d) {
         this.a();
      }

      return var4.c;
   }

   private void a() {
      int var1 = this.d * 2 + 1;
      zcfp.za[] var2 = this.b;
      zcfp.za[] var3 = new zcfp.za[var1 + 1];

      zcfp.za var5;
      for(int var4 = 0; var4 < var2.length; ++var4) {
         for(zcfp.za var6 = var2[var4]; var6 != null; var6 = var5) {
            int var7 = var6.a & var1;
            var5 = var6.b;
            var6.b = var3[var7];
            var3[var7] = var6;
         }
      }

      this.b = var3;
      this.d = var1;
   }

   private static boolean a(String var0, char[] var1, int var2, int var3) {
      if (var0.length() != var3) {
         return false;
      } else {
         for(int var4 = 0; var4 < var0.length(); ++var4) {
            if (var0.charAt(var4) != var1[var2 + var4]) {
               return false;
            }
         }

         return true;
      }
   }

   private class za {
      public int a;
      public zcfp.za b;
      public String c;

      public za(String var2, int var3, zcfp.za var4) {
         this.c = var2;
         this.a = var3;
         this.b = var4;
      }
   }
}
